import { PortalBaseSchema, PortalBaseSchemaRenderType, PortalBaseSchemaType, PortalProperty, PortalPropertyType } from "../../interface/template/declare";
import { BasePortalDefination } from "./BasePortalDefination";


export class  NoticePortalSchema implements PortalBaseSchema {
  type: PortalBaseSchemaType;
  name: string;
  render?: PortalBaseSchemaRenderType | undefined;
  properties: PortalProperty[];

  constructor() {
    this.name = 'noticeList'
    this.type = 'mutial'
    this.properties = [
      {
        title: '栏目名称',
        name: 'layoutName',
        type: PortalPropertyType.Text
      },
      {
        title: '选择公告',
        name: 'shopList',
        type: PortalPropertyType.NoticeRefer
      }
    ]
  }
}

export class NoticePortalDefination extends BasePortalDefination {

  schema: PortalBaseSchema;
  layoutName: string
  noticeList: Array<any>

  constructor() {
    super()
    this.title = '店铺公告'
    this.schema = new NoticePortalSchema()
  }
}